package com.example.property;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

import java.io.IOException;
import java.util.Properties;


/****
 *
 * 自定义配置加载器，通过远程加载配置信息
 */
public class SysPropertySourcesPlaceholderConfigurer extends PropertySourcesPlaceholderConfigurer {

    Logger logger = LoggerFactory.getLogger(getClass());

    /****
     * 加载配置中心的配置信息。
     * @param props the Properties instance to load into
     * @throws IOException
     */
    @Override
    protected void loadProperties(Properties props) throws IOException {
        super.loadProperties(props);
        props.put("sms.appKey", "123456");
    }
}
